package com.wolfeyes.framework.service;

import com.wolfeyes.framework.springsecurity.domain.model.CustomizeUserDetails;

/**
 * CacheUserSessionServiceImpl
 * 使用redis缓存实现的，存储用户会话session
 * @author yanyljava
 * @date 2019-07-19 14:29
 */
//@Service
public interface SysUserSessionCacheService {

    //private static final String USER_SESSION_PREFIX = "USER-SESSION:";
    //private static final String USER_TOKEN_TIMESTAMP_PREFIX = "USER-TOKEN-TIMESTAMP:";

	public void saveSession(CustomizeUserDetails userDetails, int second) ;

	public CustomizeUserDetails getSessionByUsername(String username) ;

	public void destroySession(String username) ;

	public void saveTokenTimestamp(String username, long mills);

	public Long getTokenTimestamp(String username);
	
}


